package com.example.barcodeapp.persenter;

import com.example.barcodeapp.base.BasePersenter;
import com.example.barcodeapp.common.CommonSubscriber;
import com.example.barcodeapp.interfaces.own.IOwn;
import com.example.barcodeapp.model.HttpManager;
import com.example.barcodeapp.ui.own.bean.YouHuiJuanBean;
import com.example.barcodeapp.ui.wode.bean.WoDHuoDong;
import com.example.barcodeapp.utils.RxUtils;

public class OnePresenterWoDeHuoDong extends BasePersenter<IOwn.Viewwodehuodong> implements IOwn.Persenterwodehuodong {


    @Override
    public void getwodehuodong(int page) {
        addSubscribe(HttpManager.getInstance().getOwnTpApi().getwodehuodong(page)
                .compose(RxUtils.rxScheduler())
                .subscribeWith(new CommonSubscriber<WoDHuoDong>(mView) {
                    @Override
                    public void onNext(WoDHuoDong hanFuDaBean) {
                        mView.getwodehuodong(hanFuDaBean);
                    }
                }));
    }
}
